package com.study.thread;

import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ThreadDoubleStart {
    @SneakyThrows
    public static void main(String[] args) {
        Thread  t1=new Thread(()->{
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            log.info("t1 执行打印");
        });
        t1.start();
        t1.join();
        log.info("主线程 join 之后打印");
        log.info("线程不能多次start");
        t1.start();

    }
}
